import Vue from 'vue'
import Router from 'vue-router'


// 登陆注册
import Login from '@/page/login/login'
import LoginA from '@/page/login/loginA'
import LoginB from '@/page/login/loginB'
import Forget from '@/page/login/forget'

// 一级页面
import page from '@/page/page'
import Home from '@/page/home'
import Shop from '@/page/shop'
import Mine from '@/page/mine'


// 订单模块
import Order from '@/page/order/order'
import newOrder from '@/page/order/newOrder'


// 我的
import Question from '@/page/mine/question'
import About from '@/page/mine/about'
import Telephone from '@/page/mine/telephone'


// 我的钱包
import Identity from '@/page/mine/identity'
import Bankcard from '@/page/mine/bankcard'
import Bankcardview from '@/page/mine/bankcardview'
import Wallet from '@/page/mine/wallet'
import WalletX from '@/page/mine/WalletX'
import Setpassword from '@/page/mine/setpassword'
import Pricehost from '@/page/mine/pricehost'
import Addbankcard from '@/page/mine/addbankcard'


// 商品
import Food from '@/page/shop/food'
import Shop_edit from '@/page/shop/shop_edit'
import Shop_view from '@/page/shop/shop_view'
import Yuangong from '@/page/shop/yuangong'
import Erweima from '@/page/shop/erweima'
import Ruzhu from '@/page/shop/ruzhu'






//首页
import Tongji from '@/page/home/tongji'
import Yaoqing from '@/page/home/yaoqing'



Vue.use(Router)

export default new Router({
  linkActiveClass: 'active',
  // mode:'history',
  mode: 'hash',
  routes: [

    // ========================首页=========================
    {
      path: '/',
      name: 'page',
      component: page,
      meta: {
        index: 0
      },
      children: [{
        path: '/',
        name: 'Home',
        component: Home,
        meta: {
          index: 1,
          title:"主页"
        }
      }, {
        path: '/page/shop',
        name: 'Shop',
        meta: {
          index: 1,
          title:"商铺"
        },
        component: Shop
      }, {
        path: '/page/mine',
        name: 'Mine',
        meta: {
          index: 1,
          title:"我的"
        },
        component: Mine
      },]
    },
    //商品管理
    {
      path: '/food',
      name: 'Food',
      meta: {
        index: 2
      },
      component: Food
    },

    // 新订单
    {
      path: '/order/newOrder',
      name: 'newOrder',
      meta: {
        index: 2
      },
      component: newOrder
    },
    {
      path: '/order/order',
      name: 'Order',
      meta: {
        index: 2
      },
      component: Order
    },

    

    // ========================我的=========================

    // 我的钱包
    {
      path: '/mine/identity',
      name: 'Identity',
      meta: {
        index: 2
      },
      component: Identity
    },
    {
      path: '/mine/bankcard',
      name: 'Bankcard',
      meta: {
        index: 2
      },
      component: Bankcard
    },
    {
      path: '/mine/Setpassword',
      name: 'Setpassword',
      meta: {
        index: 2
      },
      component: Setpassword
    },
    {
      path: '/mine/bankcardview',
      name: 'Bankcardview',
      meta: {
        index: 2
      },
      component: Bankcardview
    },
    {
      path: '/mine/wallet',
      name: 'Wallet',
      meta: {
        index: 2
      },
      component: Wallet
    },
    {
      path: '/mine/WalletX',
      name: 'WalletX',
      meta: {
        index: 2
      },
      component: WalletX
    },
    {
      path: '/mine/pricehost',
      name: 'Pricehost',
      meta: {
        index: 2
      },
      component: Pricehost
    },
    {
      path: '/mine/addbankcard',
      name: 'Addbankcard',
      meta: {
        index: 2
      },
      component: Addbankcard
    },
    // 我的列表
    {
      path: '/mine/question',
      name: 'Question',
      meta: {
        index: 89
      },
      component: Question
    },
    {
      path: '/mine/about',
      name: 'About',
      meta: {
        index: 89
      },
      component: About
    },
    {
      path: '/mine/telephone',
      name: 'Telephone',
      meta: {
        index: 89
      },
      component: Telephone
    },



    // ========================登录=========================
    {
      path: '/login',
      name: 'Login',
      meta: {
        index: 100,
        title:"商户登录"
      },
      component: Login
    },
    {
      path: '/loginA',
      name: 'LoginA',
      meta: {
        index: 100,
        title:"选择商铺"
      },
      component: LoginA
    },
    {
      path: '/loginB',
      name: 'LoginB',
      meta: {
        index: 100,
        title:"商户登录"
      },
      component: LoginB
    },
    {
      path: '/forget',
      name: 'Forget',
      meta: {
        index: 100
      },
      component: Forget
    },

    // ========================首页=========================
    {
      path: '/tongji',
      name: 'Tongji',
      meta: {
        index: 100
      },
      component: Tongji
    },
    {
      path: '/yaoqing',
      name: 'Yaoqing',
      meta: {
        index: 100
      },
      component: Yaoqing
    },

    // ========================商铺=========================
    {
      path: '/shop_edit',
      name: 'Shop_edit',
      meta: {
        index: 100
      },
      component: Shop_edit
    },
    {
      path: '/shop_view',
      name: 'Shop_view',
      meta: {
        index: 100
      },
      component: Shop_view
    },
    {
    path: '/yuangong',
    name: 'Yuangong',
    meta: {
      index: 100
    },
    component: Yuangong
  },
  {
    path: '/erweima',
    name: 'Erweima',
    meta: {
      index: 100
    },
    component: Erweima
  },
  {
    path: '/ruzhu',
    name: 'Ruzhu',
    meta: {
      index: 100
    },
    component: Ruzhu
  },

  
    
    
  ]
})
